<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- QCtmTitleBar.cpp -->
  <title>QCtmTitleBar Class | QCustomUi 1.10.0</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li><a href="index.html">QCustomUi 1.10.0</a></li>
<li><a href="index.html">QCustomUi</a></li>
<li>QCtmTitleBar</li>
<li id="buildversion">QCustomUi 1.10.0 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3 id="toc">Contents</h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#reimplemented-protected-functions">Reimplemented Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QCtmTitleBar Class</h1>
<!-- $$$QCtmTitleBar-brief -->
<p><a href="qctmwindow.html">QCtmWindow</a> 和 <a href="qctmdialog.html">QCtmDialog</a> 的自定义标题栏. <a href="#details">More...</a></p>
<!-- @@@QCtmTitleBar -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">  <span class="preprocessor">#include &lt;QCtmTitleBar.h&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> QWidget</td></tr></table></div>
<ul>
<li><a href="qctmtitlebar-members.html">List of all members, including inherited members</a></li>
</ul>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><a href="qctmtitlebar.html#iconIsVisible-prop">iconIsVisible</a></b> : bool</li>
</ul>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qctmtitlebar.html#QCtmTitleBar">QCtmTitleBar</a></b>(QWidget *<i>parent</i> = Q_NULLPTR)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qctmtitlebar.html#dtor.QCtmTitleBar">~QCtmTitleBar</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qctmtitlebar.html#iconIsVisible">iconIsVisible</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QSize &amp;</td><td class="memItemRight bottomAlign"><b><a href="qctmtitlebar.html#iconSize">iconSize</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMenuBar *</td><td class="memItemRight bottomAlign"><b><a href="qctmtitlebar.html#menuBar">menuBar</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmtitlebar.html#setIconSize">setIconSize</a></b>(const QSize &amp;<i>size</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmtitlebar.html#setIconVisible">setIconVisible</a></b>(bool <i>show</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmtitlebar.html#setMenuBar">setMenuBar</a></b>(QMenuBar *<i>menu</i>)</td></tr>
</table></div>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmtitlebar.html#iconSize-prop">iconSizeChanged</a></b>(const QSize &amp;<i>size</i>)</td></tr>
</table></div>
<h2 id="reimplemented-protected-functions">Reimplemented Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmtitlebar.html#actionEvent">actionEvent</a></b>(QActionEvent *<i>event</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qctmtitlebar.html#eventFilter">eventFilter</a></b>(QObject *<i>watched</i>, QEvent *<i>event</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmtitlebar.html#paintEvent">paintEvent</a></b>(QPaintEvent *<i>event</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmtitlebar.html#showEvent">showEvent</a></b>(QShowEvent *<i>event</i>) override</td></tr>
</table></div>
<!-- $$$QCtmTitleBar-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<div class="admonition note">
<p><b>Note: </b>最大化，最小化，关闭按钮等显示控制由 <a href="qwidget.html#windowFlags-prop">QWidget::windowFlags</a> 决定，图标显示由 <a href="qwidget.html#windowIcon-prop">QWidget::windowIcon</a> 控制，标题栏文字由centralWidget的<a href="qwidget.html#windowTitle-prop">QWidget::windowTitle</a>决定.</p>
</div>
<p><b>截图:</b></p>
<p class="centerAlign"><img src="images/QCtmTitleBarDetail.png" alt="" /></p></div>
<!-- @@@QCtmTitleBar -->
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$iconIsVisible-prop$$$iconIsVisible$$$setIconVisiblebool -->
<h3 class="fn" id="iconIsVisible-prop"><span class="name">iconIsVisible</span> : <span class="type">bool</span></h3>
<p>是否显示图标.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmtitlebar.html#iconIsVisible">iconIsVisible</a></b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmtitlebar.html#setIconVisible">setIconVisible</a></b></span>(bool <i>show</i>)</td></tr>
</table></div>
<!-- @@@iconIsVisible -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QCtmTitleBar[overload1]$$$QCtmTitleBarQWidget* -->
<h3 class="fn" id="QCtmTitleBar">QCtmTitleBar::<span class="name">QCtmTitleBar</span>(<span class="type">QWidget</span> *<i>parent</i> = Q_NULLPTR)</h3>
<p>构造函数 <i>parent</i>.</p>
<!-- @@@QCtmTitleBar -->
<!-- $$$~QCtmTitleBar[overload1]$$$~QCtmTitleBar -->
<h3 class="fn" id="dtor.QCtmTitleBar"><code>[virtual] </code>QCtmTitleBar::<span class="name">~QCtmTitleBar</span>()</h3>
<p>析构函数.</p>
<!-- @@@~QCtmTitleBar -->
<!-- $$$actionEvent[overload1]$$$actionEventQActionEvent* -->
<h3 class="fn" id="actionEvent"><code>[override virtual protected] </code><span class="type">void</span> QCtmTitleBar::<span class="name">actionEvent</span>(<span class="type"><a href="https://doc.qt.io/qt/qactionevent.html">QActionEvent</a></span> *<i>event</i>)</h3>
<!-- @@@actionEvent -->
<!-- $$$eventFilter[overload1]$$$eventFilterQObject*QEvent* -->
<h3 class="fn" id="eventFilter"><code>[override virtual protected] </code><span class="type">bool</span> QCtmTitleBar::<span class="name">eventFilter</span>(<span class="type"><a href="https://doc.qt.io/qt/qobject.html#QObject">QObject</a></span> *<i>watched</i>, <span class="type"><a href="https://doc.qt.io/qt/qevent.html">QEvent</a></span> *<i>event</i>)</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qobject.html#eventFilter">QObject::eventFilter</a>(QObject *watched, QEvent *event).</p>
<!-- @@@eventFilter -->
<!-- $$$iconIsVisible -->
<h3 class="fn" id="iconIsVisible"><span class="type">bool</span> QCtmTitleBar::<span class="name">iconIsVisible</span>() const</h3>
<p>返回是否显示图标.</p>
<p><b>Note: </b>Getter function for property iconIsVisible. </p>
<p><b>See also </b><a href="qctmtitlebar.html#setIconVisible">setIconVisible</a>.</p>
<!-- @@@iconIsVisible -->
<!-- $$$iconSize -->
<h3 class="fn" id="iconSize">const <span class="type"><a href="https://doc.qt.io/qt/qsize.html">QSize</a></span> &amp;QCtmTitleBar::<span class="name">iconSize</span>() const</h3>
<p>返回Action图标大小.</p>
<p><b>Note: </b>Getter function for property iconSize. </p>
<p><b>See also </b><a href="qctmtitlebar.html#setIconSize">setIconSize</a>.</p>
<!-- @@@iconSize -->
<!-- $$$menuBar[overload1]$$$menuBar -->
<h3 class="fn" id="menuBar"><span class="type"><a href="https://doc.qt.io/qt/qmenubar.html">QMenuBar</a></span> *QCtmTitleBar::<span class="name">menuBar</span>() const</h3>
<p>返回菜单栏, 当菜单栏对象不存在时，自动创建并返回一个新的菜单栏.</p>
<p><b>See also </b><a href="qctmtitlebar.html#setMenuBar">setMenuBar</a>.</p>
<!-- @@@menuBar -->
<!-- $$$paintEvent[overload1]$$$paintEventQPaintEvent* -->
<h3 class="fn" id="paintEvent"><code>[override virtual protected] </code><span class="type">void</span> QCtmTitleBar::<span class="name">paintEvent</span>(<span class="type"><a href="https://doc.qt.io/qt/qpaintevent.html">QPaintEvent</a></span> *<i>event</i>)</h3>
<!-- @@@paintEvent -->
<!-- $$$setIconSize -->
<h3 class="fn" id="setIconSize"><span class="type">void</span> QCtmTitleBar::<span class="name">setIconSize</span>(const <span class="type"><a href="https://doc.qt.io/qt/qsize.html">QSize</a></span> &amp;<i>size</i>)</h3>
<p>设置Action图标大小 <i>size</i>.</p>
<p><b>Note: </b>Setter function for property <a href="qctmtitlebar.html#iconSize">iconSize</a>. </p>
<p><b>See also </b><a href="qctmtitlebar.html#iconSize">iconSize</a>.</p>
<!-- @@@setIconSize -->
<!-- $$$setIconVisible -->
<h3 class="fn" id="setIconVisible"><span class="type">void</span> QCtmTitleBar::<span class="name">setIconVisible</span>(<span class="type">bool</span> <i>show</i>)</h3>
<p>设置是否显示图标 <i>show</i>.</p>
<p><b>Note: </b>Setter function for property <a href="qctmtitlebar.html#iconIsVisible">iconIsVisible</a>. </p>
<p><b>See also </b><a href="qctmtitlebar.html#iconIsVisible">iconIsVisible</a>().</p>
<!-- @@@setIconVisible -->
<!-- $$$setMenuBar[overload1]$$$setMenuBarQMenuBar* -->
<h3 class="fn" id="setMenuBar"><span class="type">void</span> QCtmTitleBar::<span class="name">setMenuBar</span>(<span class="type"><a href="https://doc.qt.io/qt/qmenubar.html">QMenuBar</a></span> *<i>menu</i>)</h3>
<p>设置菜单栏 <i>menu</i>, 当 <i>menu</i> 为nullptr时删除菜单栏.</p>
<p><b>See also </b><a href="qctmtitlebar.html#menuBar">menuBar</a>.</p>
<!-- @@@setMenuBar -->
<!-- $$$showEvent[overload1]$$$showEventQShowEvent* -->
<h3 class="fn" id="showEvent"><code>[override virtual protected] </code><span class="type">void</span> QCtmTitleBar::<span class="name">showEvent</span>(<span class="type"><a href="https://doc.qt.io/qt/qshowevent.html">QShowEvent</a></span> *<i>event</i>)</h3>
<!-- @@@showEvent -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> QCustomUi
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/> </div>
</body>
</html>
